const express = require("express");
const bodyParser = require("body-parser");
const prot = require("./utils/isPortOccupiedExpress");
const page = require('./src/page/index')

const app = express();
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(express.static(__dirname));
// 接口注入
process.nextTick(()=>{
  page(app)
})

// 服务启动
prot(app, 8080);
module.exports = prot